scale: Fix value height calculation
authorTimm Bäder <mail@baedert.org>
Wed, 16 Mar 2016 09:20:17 +0000 (10:20 +0100)
committerTimm Bäder <mail@baedert.org>
Wed, 16 Mar 2016 09:20:17 +0000 (10:20 +0100)
if (orientation) doesn't make a lot of sense but C doesn't complain and
instead evaluates orientation to TRUE for GTK_ORIENTATION_VERTICAL
(since that's 1), thus inverting the value sizes.

gtk/gtkscale.c

index 9fe1bafcf23b0a6e28ea812f75aa8bc42b9807e8..ec5804d44fb1a6bf367f22c3acab4540751d2ee7 100644 (file)
@@ -1212,7 +1212,7 @@ gtk_scale_measure_value (GtkCssGadget   *gadget,
       g_object_unref (layout);
     }
 
-  if (orientation)
+  if (orientation == GTK_ORIENTATION_HORIZONTAL)
     *minimum = *natural = width;
   else
     *minimum = *natural = height;